/**
 * @author zhanghuan
 */
import request from '@/utils/request'

/**
 * 获取分类树形列表
 */
export function getClassifyTree(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysClassify/getClassifyTree',
    method: 'POST',
    data
  })
}

/**
 * 添加组件
 */
export function addComponent(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/pageContainerDefined/insert',
    method: 'POST',
    data
  })
}

/**
 * 编辑组件
 */
export function editComponent(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/pageContainerDefined/update',
    method: 'POST',
    data
  })
}

/**
 * 删除组件
 */
export function delComponent(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/pageContainerDefined/deleteById',
    method: 'POST',
    data
  })
}

/**
 * 获取组件列表
 */
export function getComponentList(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/pageContainerDefined/queryPage',
    method: 'POST',
    data
  })
}
